<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <span>按下下面按钮，click count会加一</span>
        <p>{{click_count}}</p>
        <!-- <p>{{counter}}</p>
        <p>
            <span k-text="counter"></span>
        </p> -->
        <button @click="increase">increase the data</button>
        <p>
            <input type="text" v-model="input_data">
            <span>你的输入：</span>
            <span>{{input_data}}</span>
        </p>
    </div>
    <script src="kvue.js"></script>
    <script>
        const app = new KVue({
            el: '#app',
            data: {
                counter: 1,
                click_count: 0,
                input_data: "冬瓜冬瓜，我是西瓜"
            },
            
            increase: function() {
                app.click_count++;
            }
        })

        // setInterval(() => {
        //     app.counter++
        // }, 1000)
        function increase () {
            console.log("increase function called... ")
            app.click_count++;
        }
    </script>
</body>
</html>